package net.csdn.business.common.annotation;

import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import net.csdn.business.common.config.serializer.JsonCustomFormatSerializer;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @author likun
 * @date 2022/7/20 14:11
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@JacksonAnnotationsInside
@JsonSerialize(using = JsonCustomFormatSerializer.class)
public @interface JsonCustomFormat {
    String inputPattern() default "yyyy-MM-dd'T'HH:mm:ss+08:00";

    String pattern() default "yyyy-MM-dd HH:mm:ss";
}